gtk4.git
6 years agoMerge branch 'filechooser-save-again' into 'master'
Matthias Clasen [Thu, 2 May 2019 01:55:28 +0000 (01:55 +0000)]
Merge branch 'filechooser-save-again' into 'master'

Make file chooser saving work again

See merge request GNOME/gtk!808

6 years agoMerge branch 'kill-display-changed' into 'master'
Matthias Clasen [Thu, 2 May 2019 01:49:31 +0000 (01:49 +0000)]
Merge branch 'kill-display-changed' into 'master'

Kill display changed

See merge request GNOME/gtk!807

6 years agoMake file chooser saving work again
Matthias Clasen [Thu, 2 May 2019 01:08:21 +0000 (01:08 +0000)]
Make file chooser saving work again

I was a little overzealous when going
for the new default handling here. We
can't switch to gtk_widget_activate_default
before we actually handle the default.activate
action.

6 years agoDrop the GtkWidget::display-changed signal
Matthias Clasen [Thu, 2 May 2019 00:11:55 +0000 (00:11 +0000)]
Drop the GtkWidget::display-changed signal

Display changes now happen exclusively through
the ::root and ::unroot vfuncs. Third parties
can observe display changes by listening
for notify::root.

6 years agogtk: Use root/unroot instead of display-changed
Matthias Clasen [Thu, 2 May 2019 00:08:49 +0000 (00:08 +0000)]
gtk: Use root/unroot instead of display-changed

The display-changed signal is going away

6 years agomenu: Listen only for notify::root
Matthias Clasen [Wed, 1 May 2019 22:52:13 +0000 (22:52 +0000)]
menu: Listen only for notify::root

We no longer emit the display-changed signal,
so stop listening.

6 years agowindow: Implement display change via root/unroot
Matthias Clasen [Wed, 1 May 2019 22:41:20 +0000 (22:41 +0000)]
window: Implement display change via root/unroot

Export gtk_widget_root/unroot privately,
make them work on roots, and use them in
gtk_window_set_display. This gets us to a
single way to listen for display changes,
the root property.

6 years agoMerge branch 'inspector-menu-fix' into 'master'
Matthias Clasen [Wed, 1 May 2019 23:01:50 +0000 (23:01 +0000)]
Merge branch 'inspector-menu-fix' into 'master'

Inspector menu fix

See merge request GNOME/gtk!804

6 years agomenus: Fix menus on non-default displays
Matthias Clasen [Wed, 1 May 2019 20:41:59 +0000 (20:41 +0000)]
menus: Fix menus on non-default displays

Currently, we sometimes emit display-changed
when the display changed, and sometimes we don't
since the display is changed via gtk_widget_root.

Listen for notify::root as well and update our
display. This is a temporary fix - all display
changes should go through gtk_widget_root,
eventually.

6 years agoMerge branch 'kill-menu-display' into 'master'
Benjamin Otte [Wed, 1 May 2019 22:09:13 +0000 (22:09 +0000)]
Merge branch 'kill-menu-display' into 'master'

Kill menu display

See merge request GNOME/gtk!806

6 years agoRemove gtk_menu_set_display
Matthias Clasen [Wed, 1 May 2019 21:49:25 +0000 (21:49 +0000)]
Remove gtk_menu_set_display

Menus should always be attached to a toplevel,
in which case they get their display that way.

6 years agotests: Stop using gtk_menu_set_display
Matthias Clasen [Wed, 1 May 2019 21:48:56 +0000 (21:48 +0000)]
tests: Stop using gtk_menu_set_display

It is not needed here.

6 years agoMerge branch 'expander-demo-fix' into 'master'
Matthias Clasen [Wed, 1 May 2019 21:19:27 +0000 (21:19 +0000)]
Merge branch 'expander-demo-fix' into 'master'

gtk-demo: Make the expander demo behave again

See merge request GNOME/gtk!805

6 years agogtk-demo: Make the expander demo behave again
Matthias Clasen [Wed, 1 May 2019 21:12:36 +0000 (21:12 +0000)]
gtk-demo: Make the expander demo behave again

Changes to the dialog hierarchy have affected
this demo, that admittedly pokes at message
dialog internals. Do that some more, to fix
things up.

6 years agowayland: sanity check events at the source
Matthias Clasen [Wed, 1 May 2019 20:39:44 +0000 (20:39 +0000)]
wayland: sanity check events at the source

Sanity check events before we throw them into
the event queue, as this makes it much easier
to track down the culprit.

6 years agogdk: add a sanity check for events
Matthias Clasen [Wed, 1 May 2019 20:39:00 +0000 (20:39 +0000)]
gdk: add a sanity check for events

Before delivering events to GTK, make sure
they're sane. For now, this means making sure
the surface and device are from the same
display.

6 years agoseat: Add a sanity check
Matthias Clasen [Wed, 1 May 2019 20:46:02 +0000 (20:46 +0000)]
seat: Add a sanity check

apis that takes multiple display-relative objects
should make sure that they are all from the same
display, or hard-to-track-down badness will happen
later on.

Add such a check for the surface and device arguments
of gdk_seat_grab. This helped in tracking down
critical warnings from combo boxes in the inspector.

6 years agoMerge branch 'add-color-button-fix' into 'master'
Matthias Clasen [Wed, 1 May 2019 17:26:34 +0000 (17:26 +0000)]
Merge branch 'add-color-button-fix' into 'master'

Adwaita: Fix 'add color' button corners

Closes #1856

See merge request GNOME/gtk!801

6 years agoAdwaita: Fix 'add color' button corners
Matthias Clasen [Wed, 1 May 2019 17:18:39 +0000 (17:18 +0000)]
Adwaita: Fix 'add color' button corners

The specification for border-radius goes
top-left top-right bottom-right bottom-left.
The css for the add button in the color
chooser got this wrong, and was showing
a broken top-right corner.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1856
6 years agoAdd a few placeholder documentation block to have g-i annotations
Rico Tzschichholz [Wed, 1 May 2019 13:03:16 +0000 (15:03 +0200)]
Add a few placeholder documentation block to have g-i annotations

6 years agoMerge branch 'entry-fix' into 'master'
Matthias Clasen [Wed, 1 May 2019 05:21:09 +0000 (05:21 +0000)]
Merge branch 'entry-fix' into 'master'

Fix Emoji insertion

See merge request GNOME/gtk!800

6 years agotext: Make Emoji insertion work properly
Matthias Clasen [Wed, 1 May 2019 05:13:52 +0000 (05:13 +0000)]
text: Make Emoji insertion work properly

We are now getting focus-out and focus-in events
when the Emoji chooser is shown and hidden, and
this is causing the text to select-on-entry before
inserting the Emoji, which then deletes the selection.

Avoid this by saving and restoring the selection
when presenting the Emoji chooser.

6 years agoinspector: Track readonly property values
Matthias Clasen [Wed, 1 May 2019 04:57:54 +0000 (04:57 +0000)]
inspector: Track readonly property values

That a property can't be set does not mean
its value can't change. This was showing up
as the cursor-position and selection-bound
properties in GtkText not showing their
current value in the inspector.

6 years agoinspector: Don't listen for notify twice
Matthias Clasen [Wed, 1 May 2019 04:44:07 +0000 (04:44 +0000)]
inspector: Don't listen for notify twice

The property list now uses property editors
for the value, which listen for updates by
themselves, so no need for the list to do it.

6 years agoentry: only notify properties we have
Matthias Clasen [Wed, 1 May 2019 04:41:28 +0000 (04:41 +0000)]
entry: only notify properties we have

GtkText now has the propagate-text-width property,
which is not present on GtkEntry, so we can't just
blindly forward all properties.

6 years agoMerge branch 'minus-one' into 'master'
Matthias Clasen [Wed, 1 May 2019 03:38:42 +0000 (03:38 +0000)]
Merge branch 'minus-one' into 'master'

fix signedness issues in api

Closes #1555

See merge request GNOME/gtk!799

6 years agoMerge branch 'xdg-output' into 'master'
Matthias Clasen [Wed, 1 May 2019 03:34:56 +0000 (03:34 +0000)]
Merge branch 'xdg-output' into 'master'

[gtk4] wayland: Add support for xdg-output

Closes #1828

See merge request GNOME/gtk!751

6 years agoMerge branch 'window-activate-revert-master' into 'master'
Matthias Clasen [Wed, 1 May 2019 03:32:12 +0000 (03:32 +0000)]
Merge branch 'window-activate-revert-master' into 'master'

Revert "gdk: deactivate/activate surface on keyboard grabs"

See merge request GNOME/gtk!795

6 years agotextutil: Fix signedness issues in api
Matthias Clasen [Wed, 1 May 2019 03:25:02 +0000 (03:25 +0000)]
textutil: Fix signedness issues in api

A length argument that can be -1 should be signed.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
6 years agobuilder: Fix signedness issues in apis
Matthias Clasen [Wed, 1 May 2019 03:21:29 +0000 (03:21 +0000)]
builder: Fix signedness issues in apis

Whenever we take a length argument that can
be -1 for 'nul-terminated', it should be
gssize, not gsize.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
6 years agoMerge branch 'grab-cursor-fix' into 'master'
Matthias Clasen [Wed, 1 May 2019 00:42:09 +0000 (00:42 +0000)]
Merge branch 'grab-cursor-fix' into 'master'

window: Prevent resize cursors from sticking

Closes #23

See merge request GNOME/gtk!797

6 years agowindow: Prevent resize cursors from sticking
Matthias Clasen [Wed, 1 May 2019 00:16:21 +0000 (00:16 +0000)]
window: Prevent resize cursors from sticking

When a modal dialog is smaller than its parent,
we were keeping the resize cursor from the dialogs
edge all over the parent window, which looks
really irritating, since the resize cursors are
closely associated with the window edge. Fix
this by falling back to the default cursor
outside the grab widgets surface.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/23
6 years agoRevert "gdk: deactivate/activate surface on keyboard grabs"
Samuel Thibault [Tue, 30 Apr 2019 14:45:51 +0000 (16:45 +0200)]
Revert "gdk: deactivate/activate surface on keyboard grabs"

This reverts commits 35417a5a74bfebd69b5c069d7a2f517ba571bcf9 and
01455399e83a3dbafb0cdc6e12c7003b2f472a40.

This reintroduces #85, but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.

6 years agofilechooserwidget: Only query clock-format setting once
Timm Bäder [Tue, 30 Apr 2019 04:43:42 +0000 (06:43 +0200)]
filechooserwidget: Only query clock-format setting once

We don't support that setting life-updating anyway. So, instead of
getting the value *every time we format a time*, get it once for the
filechooserwidget and reuse that value.

6 years agoAdwaita: Fix active spinbutton button image color
Timm Bäder [Tue, 30 Apr 2019 03:54:00 +0000 (05:54 +0200)]
Adwaita: Fix active spinbutton button image color

The spinbutton>button>image is currently blue when the image is clicked
and dark-ish when the button is clicked(but not the image). This was not
the case before since we didn't even propagate :active down to the image
child. Fix this by only applying the blue color to direct image children
of entries.

6 years agofilechooserwidget: Remove unnecessary deprecation guards
Timm Bäder [Mon, 29 Apr 2019 10:04:25 +0000 (12:04 +0200)]
filechooserwidget: Remove unnecessary deprecation guards

6 years agofilechooserwidget: Stop using gtk_widget_get_allocat*
Timm Bäder [Mon, 29 Apr 2019 09:46:54 +0000 (11:46 +0200)]
filechooserwidget: Stop using gtk_widget_get_allocat*

6 years agofilechooserwidget: Shorten cancel_all_operations() impl
Timm Bäder [Mon, 29 Apr 2019 09:29:23 +0000 (11:29 +0200)]
filechooserwidget: Shorten cancel_all_operations() impl

6 years agofilechooserwidget: Shorten dispose impl a bit
Timm Bäder [Mon, 29 Apr 2019 09:27:30 +0000 (11:27 +0200)]
filechooserwidget: Shorten dispose impl a bit

6 years agofilechooserwidget: Remove some unnecessary show() calls
Timm Bäder [Mon, 29 Apr 2019 09:23:01 +0000 (11:23 +0200)]
filechooserwidget: Remove some unnecessary show() calls

Widgets are visible by default now.

6 years agofilechooserwidget: Use a bin layout
Timm Bäder [Mon, 29 Apr 2019 09:21:53 +0000 (11:21 +0200)]
filechooserwidget: Use a bin layout

Instead of implementing size_allocate and measure manually.

6 years agofilechooserwidget: Shorten finalize implementation a bit
Timm Bäder [Mon, 29 Apr 2019 09:17:38 +0000 (11:17 +0200)]
filechooserwidget: Shorten finalize implementation a bit

6 years agofilechooserwidget: Inline fuction into only caller
Timm Bäder [Mon, 29 Apr 2019 09:15:19 +0000 (11:15 +0200)]
filechooserwidget: Inline fuction into only caller

6 years agofilechooserwidget: Fix rename popover widget alignment
Timm Bäder [Mon, 29 Apr 2019 09:07:17 +0000 (11:07 +0200)]
filechooserwidget: Fix rename popover widget alignment

6 years agoplacesview: Bring spacing in the actionbar back
Timm Bäder [Mon, 29 Apr 2019 06:47:24 +0000 (08:47 +0200)]
placesview: Bring spacing in the actionbar back

In particular between the Connect button and the adjacent button/entry
combination.

6 years agofilechooserwidget: Pick reasonable default sidebar width
Timm Bäder [Mon, 29 Apr 2019 06:40:58 +0000 (08:40 +0200)]
filechooserwidget: Pick reasonable default sidebar width

The old default of 148px doesn't work everywhere. Instead, pick a
default value of -1 and measure() the sidebar widget in the
filechooserwidget in that case. Other values >= 0 are still handled as
before.

6 years agofilechooserwidget: Delay view switch to search hits
Timm Bäder [Mon, 29 Apr 2019 06:33:02 +0000 (08:33 +0200)]
filechooserwidget: Delay view switch to search hits

Leave it to the ::hits-added handler to switch to the list of search
hits. This way we don't get a weird transition when the current search
didn't have any hits and the next one doesn't either.
Searches with hits still feel good.

6 years agoMerge branch 'fix-win32-gl-resize' into 'master'
Chun-wei Fan [Tue, 30 Apr 2019 03:35:16 +0000 (03:35 +0000)]
Merge branch 'fix-win32-gl-resize' into 'master'

Fix win32 gl resize

See merge request GNOME/gtk!694

6 years agoMerge branch 'modelbutton-focus' into 'master'
Matthias Clasen [Mon, 29 Apr 2019 19:32:31 +0000 (19:32 +0000)]
Merge branch 'modelbutton-focus' into 'master'

Adwaita: Give model buttons visible focus

See merge request GNOME/gtk!794

6 years agoMerge branch 'frameclock-property' into 'master'
Matthias Clasen [Mon, 29 Apr 2019 19:23:09 +0000 (19:23 +0000)]
Merge branch 'frameclock-property' into 'master'

surface: Add a frame-clock property

See merge request GNOME/gtk!791

6 years agoAdwaita: Give model buttons visible focus
Matthias Clasen [Fri, 19 Apr 2019 21:33:17 +0000 (21:33 +0000)]
Adwaita: Give model buttons visible focus

Hard to use keynav, otherwise.  Also, hard
to debug focus issues if you can't see where
the focus is.

6 years agosurface: Add a frame-clock property
Matthias Clasen [Mon, 22 Apr 2019 01:14:28 +0000 (01:14 +0000)]
surface: Add a frame-clock property

Now that GdkSurface has properties, it makes
sense to turn the frame clock into one too.

This will make it easier to reshuffle some
of the surface constructors later.

6 years agoMerge branch 'tooltip-cleanup' into 'master'
Matthias Clasen [Mon, 29 Apr 2019 19:04:49 +0000 (19:04 +0000)]
Merge branch 'tooltip-cleanup' into 'master'

tooltip: Remove an unused gdk_surface_get_root_coords call

See merge request GNOME/gtk!793

6 years agoMerge branch 'window-cursor' into 'master'
Benjamin Otte [Mon, 29 Apr 2019 19:02:21 +0000 (19:02 +0000)]
Merge branch 'window-cursor' into 'master'

window: Set cursor on the right surface

See merge request GNOME/gtk!792

6 years agoMerge branch 'accessible-present' into 'master'
Benjamin Otte [Mon, 29 Apr 2019 19:02:15 +0000 (19:02 +0000)]
Merge branch 'accessible-present' into 'master'

icon view accessible: Stop presenting windows

See merge request GNOME/gtk!790

6 years agotooltip: Remove an unused gdk_surface_get_root_coords call
Matthias Clasen [Mon, 25 Mar 2019 02:41:22 +0000 (22:41 -0400)]
tooltip: Remove an unused gdk_surface_get_root_coords call

The tx and ty variables are not used, so don't
bother setting them.

6 years agowindow: Set cursor on the right surface
Matthias Clasen [Fri, 26 Apr 2019 23:48:13 +0000 (23:48 +0000)]
window: Set cursor on the right surface

Set the cursor on the surface of the target
widget, not the surface of some of its parents.

This does not make a difference currently.
But it will in the future, when we have
parented widgets with surfaces.

6 years agoicon view accessible: Stop presenting windows
Matthias Clasen [Mon, 18 Mar 2019 01:27:39 +0000 (21:27 -0400)]
icon view accessible: Stop presenting windows

Thats really not its business.

6 years agoMerge branch 'wayland-grab-fix' into 'master'
Matthias Clasen [Mon, 29 Apr 2019 18:42:46 +0000 (18:42 +0000)]
Merge branch 'wayland-grab-fix' into 'master'

wayland: Only check incorrect top-most for grabbing popups

See merge request GNOME/gtk!789

6 years agowayland: Only check top-most for grabbing popups
Jonas Ådahl [Wed, 24 Apr 2019 11:33:12 +0000 (13:33 +0200)]
wayland: Only check top-most for grabbing popups

Non-grabbing popups are not limited to a single
nesting stack, as per the spec, so we should not
prevent that on the client-side.

6 years agowayland: Reshuffle some internals
Matthias Clasen [Sat, 20 Apr 2019 00:08:14 +0000 (00:08 +0000)]
wayland: Reshuffle some internals

Make find_grab_input_seat return a GdkWaylandSeat
instead of a struct wl_seat, so we can use it and
avoid calling gdk_display_get_default_seat when
we need to get a serial later.

6 years agoAdwaita: tone down lowres icon aid
Jakub Steiner [Mon, 29 Apr 2019 13:06:32 +0000 (15:06 +0200)]
Adwaita: tone down lowres icon aid

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1818

6 years agoMerge branch 'wip/baedert/fix-gl-debug' into 'master'
Alexander Larsson [Mon, 29 Apr 2019 11:42:04 +0000 (11:42 +0000)]
Merge branch 'wip/baedert/fix-gl-debug' into 'master'

Fix GL debugging

See merge request GNOME/gtk!778

6 years agoUpdate Esperanto translation
Kristjan SCHMIDT [Mon, 29 Apr 2019 06:16:28 +0000 (06:16 +0000)]
Update Esperanto translation

6 years agoMerge branch 'transform-fixes' into 'master'
Benjamin Otte [Mon, 29 Apr 2019 00:42:28 +0000 (00:42 +0000)]
Merge branch 'transform-fixes' into 'master'

Small fixes to GskTransform

See merge request GNOME/gtk!660

6 years agoUse getters for translation and scaling components
Emmanuele Bassi [Fri, 22 Mar 2019 13:54:29 +0000 (13:54 +0000)]
Use getters for translation and scaling components

Instead of accessing the matrix cells directly.

6 years agoNever compare floats for equality
Emmanuele Bassi [Fri, 22 Mar 2019 12:39:28 +0000 (12:39 +0000)]
Never compare floats for equality

Floating point values cannot ever be compared for equality. GLib has a
G_APPROX_VALUE macro that lets us compare two value within a provided
precision, so we should use that instead.

6 years agoUse matrix equality in GskTransform
Emmanuele Bassi [Fri, 22 Mar 2019 12:38:36 +0000 (12:38 +0000)]
Use matrix equality in GskTransform

Graphene has new API to check for equality, so we should use it instead
of doing a byte-by-byte comparison.

6 years agoUpdate the version of Graphene
Emmanuele Bassi [Fri, 22 Mar 2019 12:33:13 +0000 (12:33 +0000)]
Update the version of Graphene

We're going to use newly added API soon.

6 years agoUse atomic boxing instead of manual refcounting
Emmanuele Bassi [Fri, 22 Mar 2019 11:45:57 +0000 (11:45 +0000)]
Use atomic boxing instead of manual refcounting

Artisanal, homegrown, locally sourced, vegan reference counting has been
replaced by the appropriate API in GLib, which does small things like
saturation and type checking.

6 years agoMerge branch 'default-handling' into 'master'
Matthias Clasen [Sun, 28 Apr 2019 23:51:17 +0000 (23:51 +0000)]
Merge branch 'default-handling' into 'master'

Default handling

See merge request GNOME/gtk!786

6 years agoFix builder parser tests
Matthias Clasen [Sun, 28 Apr 2019 23:44:07 +0000 (23:44 +0000)]
Fix builder parser tests

The line numbers changed here because we
removed some properties.

6 years agotests: Fix a default-related test
Matthias Clasen [Sun, 28 Apr 2019 23:40:57 +0000 (23:40 +0000)]
tests: Fix a default-related test

The test was setting has-default, but testing
receives-default.

6 years agoDrop the can-default property
Matthias Clasen [Sun, 28 Apr 2019 23:28:39 +0000 (23:28 +0000)]
Drop the can-default property

It was added at a time when default buttons
had a very large external border that would disrupt
aligment. Not a problem nowadays.

6 years agoinspector: Stop showing default widget in misc
Matthias Clasen [Sun, 28 Apr 2019 19:25:31 +0000 (19:25 +0000)]
inspector: Stop showing default widget in misc

This is just a regular window property now,
no need for special casing.

6 years agowidget: Drop gtk_widget_grab_default
Matthias Clasen [Sat, 27 Apr 2019 03:57:13 +0000 (03:57 +0000)]
widget: Drop gtk_widget_grab_default

The default widget is mostly a dialog concept,
and does not really need this generic api.

If you need to mark a widget as default,
use gtk_window_set_default() directly.

6 years agowidget: Remove special handling for has-default
Matthias Clasen [Sat, 27 Apr 2019 03:49:52 +0000 (03:49 +0000)]
widget: Remove special handling for has-default

We used to handle has-default specially in ui
files. It was awkward, so stop doing that. If you
need to influence the default widget in a window,
you can just set the default-widget property.

6 years agowidget-factory: Stop setting has-default in ui files
Matthias Clasen [Sat, 27 Apr 2019 03:47:28 +0000 (03:47 +0000)]
widget-factory: Stop setting has-default in ui files

We can just set the default-widget property. The
special handling for has-default in ui files is
going away.

6 years agoStop using gtk_widget_grab_default
Matthias Clasen [Sat, 27 Apr 2019 03:20:41 +0000 (03:20 +0000)]
Stop using gtk_widget_grab_default

Replace gtk_widget_grab_default by gtk_window_set_default_widget.

6 years agoDrop gtk_window_activate_default
Matthias Clasen [Sun, 28 Apr 2019 18:41:43 +0000 (18:41 +0000)]
Drop gtk_window_activate_default

This api has been replaced by an action that
can be activated with gtk_widget_activate_action.

6 years agofile chooser: Stop using gtk_window_activate_default
Matthias Clasen [Sun, 28 Apr 2019 18:33:27 +0000 (18:33 +0000)]
file chooser: Stop using gtk_window_activate_default

Instead, use the new way of activating default.

I think most of the default handling in
GtkFileChooserDialog should be dropped, but
for now this keeps things working.

6 years agomount operation: Handle default activation via action
Matthias Clasen [Sun, 28 Apr 2019 17:34:20 +0000 (17:34 +0000)]
mount operation: Handle default activation via action

Switch to the new way of activating default.

6 years agoentry: Activate default via action
Matthias Clasen [Sun, 28 Apr 2019 18:12:53 +0000 (18:12 +0000)]
entry: Activate default via action

Switch to the new way of activating default.

6 years agolabel: Activate default via action
Matthias Clasen [Sun, 28 Apr 2019 18:12:15 +0000 (18:12 +0000)]
label: Activate default via action

Switch to the new way of activating default.

6 years agoAdd gtk_widget_activate_default
Matthias Clasen [Sun, 28 Apr 2019 22:31:55 +0000 (22:31 +0000)]
Add gtk_widget_activate_default

This is a convenience wrapper for
activating the "default.activate" action.

6 years agopopover: Add a default.activate action
Matthias Clasen [Sun, 28 Apr 2019 17:07:05 +0000 (17:07 +0000)]
popover: Add a default.activate action

This is a first example of a widget intercepting
the default.activate for its own handling.

6 years agowindow: Add a default.activate action
Matthias Clasen [Sat, 27 Apr 2019 03:12:54 +0000 (03:12 +0000)]
window: Add a default.activate action

Activating this action will replace other
activate_default apis. It is more flexible,
since intermediate widgets can intercept the
action and do their own handling.

6 years agopopover: Add a default-widget property
Matthias Clasen [Sun, 28 Apr 2019 16:54:02 +0000 (16:54 +0000)]
popover: Add a default-widget property

This is part of redoing default widget handling.

6 years agoRename gtk_window_set_default
Matthias Clasen [Sun, 28 Apr 2019 19:15:11 +0000 (19:15 +0000)]
Rename gtk_window_set_default

Call it gtk_window_set_default_widget, to match
the getter, and the property name. Update all
callers.

6 years agowindow: Add a default-widget property
Matthias Clasen [Sun, 28 Apr 2019 16:45:22 +0000 (16:45 +0000)]
window: Add a default-widget property

This is a part of redoing default widget handling.

6 years agowidget: Add a convenience api to activate actions
Matthias Clasen [Sun, 28 Apr 2019 18:04:28 +0000 (18:04 +0000)]
widget: Add a convenience api to activate actions

Since actions are used increasingly, we should
have a convenient way to trigger an action in
the context of a widget.

6 years agoMerge branch 'focus-cleanup' into 'master'
Matthias Clasen [Sun, 28 Apr 2019 23:17:46 +0000 (23:17 +0000)]
Merge branch 'focus-cleanup' into 'master'

Focus cleanup

See merge request GNOME/gtk!788

6 years agoAvoid critical warnings
Matthias Clasen [Sun, 28 Apr 2019 22:55:43 +0000 (22:55 +0000)]
Avoid critical warnings

These critical warnings break the tests, otherwise.

6 years agoDrop gtk_window_activate_focus
Matthias Clasen [Sun, 28 Apr 2019 19:02:18 +0000 (19:02 +0000)]
Drop gtk_window_activate_focus

This api wasn't used anywhere in GTK. And since
we've dropped the variant for the default widget,
this one should go too. If it is needed, it should
become and action too.

6 years agowidget: Remove special handling of has-focus
Matthias Clasen [Sun, 28 Apr 2019 22:07:22 +0000 (22:07 +0000)]
widget: Remove special handling of has-focus

We used to handle has-focus in ui files specially.
It was awkward, so stop doing that. If you need
to influence the initial focus of a window, you
can just set the focus-widget property.

6 years agowindow: Fix up the buildable implementation
Matthias Clasen [Sun, 28 Apr 2019 19:37:41 +0000 (19:37 +0000)]
window: Fix up the buildable implementation

We were assuming that the parent class has a custom
set_property, which may not be the case. Be more
careful.

6 years agoMerge branch 'inspector-prop-sort' into 'master'
Matthias Clasen [Sun, 28 Apr 2019 22:03:31 +0000 (22:03 +0000)]
Merge branch 'inspector-prop-sort' into 'master'

inspector: Make property list sortable again

See merge request GNOME/gtk!787

6 years agoinspector: Make property list sortable again
Matthias Clasen [Sun, 28 Apr 2019 21:56:10 +0000 (21:56 +0000)]
inspector: Make property list sortable again

We lost this when moving from a treeview to
a listbox. Bring it back, with homegrown list
headers.

6 years agoMerge branch 'file-chooser-location-escape' into 'master'
Matthias Clasen [Sun, 28 Apr 2019 16:16:31 +0000 (16:16 +0000)]
Merge branch 'file-chooser-location-escape' into 'master'

file chooser: Stay focused

Closes #1851

See merge request GNOME/gtk!785

6 years agofile chooser: Stay focused
Matthias Clasen [Sun, 28 Apr 2019 16:08:21 +0000 (16:08 +0000)]
file chooser: Stay focused

When hitting Escape in the location entry,
we were not moving the focus anywhere,
causing focus to be NULL, and key bindings
to stop working. The visible effect was
that Ctrl-L / Escape / Ctrl-L would not
get back to the location entry, as expected.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1851